<!doctype html>

<html lang="zh-CN">
  <head>
    <meta charset="utf-8"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover"/>
    <meta http-equiv="X-UA-Compatible" content="ie=edge"/>
    <link rel="shortcut icon" href="/favicon.ico">
    <title>比特校园兼职</title>
    <!-- 导入CSS -->
    <link href="./dist/css/tabler.min.css?1674944402" rel="stylesheet"/>
    <link rel="stylesheet" href="dist/css/jquery.toast.css">
    <link rel="stylesheet" href="./dist/editor.md/css/editormd.min.css">
  </head>
  <body >
    <!-- page 页面开始 -->
    <div class="page">
        <!-- 头部 导航 开始 -->
        <header class="navbar navbar-expand-md navbar-light d-print-none">
          <div class="container-xl">
            <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar-menu" aria-controls="navbar-menu" aria-expanded="false" aria-label="Toggle navigation">
              <span class="navbar-toggler-icon"></span>
            </button>
            <!-- 导航左侧 logo 按钮 -->
            <h1 class="navbar-brand navbar-brand-autodark d-none-navbar-horizontal pe-0 pe-md-3">
              <a href="javascript:void(0);">
                <img src="./image/bit-logo.png" width="32" height="32" alt="Tabler" class="navbar-brand-image me-3">
              </a>
            </h1>
            <!-- 导航右侧 -->
            <div class="navbar-nav flex-row order-md-last">
              <!-- 搜索框 如果不在首页，可以按需要显示，实现搜索功能-->
              <div class="nav-item d-none d-md-flex me-3" style="visibility: hidden;" id="navbar_input_search">
                <div class="my-2 my-md-0 flex-grow-1 flex-md-grow-0 order-first order-md-last">
                  <div class="input-icon">
                    <span class="input-icon-addon">
                      <svg xmlns="http://www.w3.org/2000/svg" class="icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M10 10m-7 0a7 7 0 1 0 14 0a7 7 0 1 0 -14 0" /><path d="M21 21l-6 -6" /></svg>
                    </span>
                    <input type="text" value="" class="form-control" placeholder="输入关键字..." aria-label="Search in website">
                  </div>
                </div>
              </div>
              
              <!-- 主题样式日夜转换 -->
              <div class="d-none d-md-flex">
                <div class="nav-item dropdown d-none d-md-flex me-3">
                  <a href="?theme=dark" class="nav-link px-0 hide-theme-dark" title="切换至夜间模式" data-bs-toggle="tooltip"
data-bs-placement="bottom">
                    <svg xmlns="http://www.w3.org/2000/svg" class="icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M12 3c.132 0 .263 0 .393 0a7.5 7.5 0 0 0 7.92 12.446a9 9 0 1 1 -8.313 -12.454z" /></svg>
                  </a>
                  <a href="?theme=light" class="nav-link px-0 hide-theme-light" title="切换至白天模式" data-bs-toggle="tooltip"
  data-bs-placement="bottom">
                    <svg xmlns="http://www.w3.org/2000/svg" class="icon" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M12 12m-4 0a4 4 0 1 0 8 0a4 4 0 1 0 -8 0" /><path d="M3 12h1m8 -9v1m8 8h1m-9 8v1m-6.4 -15.4l.7 .7m12.1 -.7l-.7 .7m0 11.4l.7 .7m-12.1 -.7l-.7 .7" /></svg>
                  </a>
                </div>
              </div>

              <!-- 用户信息 -->
              <div class="nav-item dropdown">
                <a href="javascript:void(0);" class="nav-link d-flex lh-1 text-reset p-0" data-bs-toggle="dropdown" aria-label="Open user menu">
                  <!-- 用户头像，也可以用img标签 -->
                  <span class="avatar avatar-sm" id="index-nav-user-avatar"></span>
                  <div class="d-none d-xl-block ps-2">
                    <!-- 用户名 -->
                    <div id="index-nav-user-name"></div>
                  </div>
                </a>
                <!-- 下拉菜单 -->
                <div class="dropdown-menu dropdown-menu-end dropdown-menu-arrow">
                  <a href="javascript:void(0);" class="dropdown-item" id="index-nav-record-list">接收投递</a>
                  <a href="javascript:void(0);" class="dropdown-item" id="index-nav-job-list">职位管理</a>
                  <a href="javascript:void(0);" class="dropdown-item" id="index-nav-job-new">发布职位</a>
                  <a href="javascript:void(0);" class="dropdown-item" id="index-nav-settings">个人中心</a>
                  <div class="dropdown-divider"></div>
                  <a href="javascript:void(0);"  id="index-nav-logout" class="dropdown-item" data-bs-toggle="modal" data-bs-target="#modal_user_logout">
                    <svg  xmlns="http://www.w3.org/2000/svg"  width="24"  height="24"  viewBox="0 0 24 24"  fill="none"  stroke="currentColor"  stroke-width="2"  stroke-linecap="round"  stroke-linejoin="round"  class="icon icon-tabler icons-tabler-outline icon-tabler-logout icon dropdown-item-icon"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M14 8v-2a2 2 0 0 0 -2 -2h-7a2 2 0 0 0 -2 2v12a2 2 0 0 0 2 2h7a2 2 0 0 0 2 -2v-2" /><path d="M9 12h12l-3 -3" /><path d="M18 15l3 -3" /></svg>
                    <span class="text-red">退出</span></a>
                </div>
              </div>
            </div>
            <!-- 身份切换 -->
            <div class="collapse navbar-collapse" id="navbar-menu">
              <div class="d-flex flex-column flex-md-row flex-fill align-items-stretch align-items-md-center">
                <ul class="navbar-nav">
                  <li class="nav-item active" id="find_positions">
                    <a class="nav-link" href="javascript:void(0);">
                      <span class="nav-link-icon d-md-none d-lg-inline-block">
                        <svg  xmlns="http://www.w3.org/2000/svg"  width="24"  height="24"  viewBox="0 0 24 24"  fill="none"  stroke="currentColor"  stroke-width="2"  stroke-linecap="round"  stroke-linejoin="round"  class="icon icon-tabler icons-tabler-outline icon-tabler-lemon"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M17.536 3.393c3.905 3.906 3.905 10.237 0 14.143c-3.906 3.905 -10.237 3.905 -14.143 0l14.143 -14.143" /><path d="M5.868 15.06a6.5 6.5 0 0 0 9.193 -9.192" /><path d="M10.464 10.464l4.597 4.597" /><path d="M10.464 10.464v6.364" /><path d="M10.464 10.464h6.364" /></svg>
                      </span>
                      <span class="nav-link-title">
                        找机会
                      </span>
                    </a>
                  </li>
                  <li class="nav-item" id="find_candidate">
                    <a class="nav-link" href="javascript:void(0);">
                      <span class="nav-link-icon d-md-none d-lg-inline-block">
                        <svg  xmlns="http://www.w3.org/2000/svg"  width="24"  height="24"  viewBox="0 0 24 24"  fill="none"  stroke="currentColor"  stroke-width="2"  stroke-linecap="round"  stroke-linejoin="round"  class="icon icon-tabler icons-tabler-outline icon-tabler-trophy"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M8 21l8 0" /><path d="M12 17l0 4" /><path d="M7 4l10 0" /><path d="M17 4v8a5 5 0 0 1 -10 0v-8" /><path d="M5 9m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0" /><path d="M19 9m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0" /></svg>
                      </span>
                      <span class="nav-link-title">
                        找牛人
                      </span>
                    </a>
                  </li>
                </ul>
              </div>
            </div>
          </div>
        </header>
        <!-- 头部 导航 结束 -->

        <!-- 正文 开始 -->
        <div class="page-wrapper">
          <!-------- 动态内容 ------------->
          <div id="bit-page-content"></div>

          <!-- 退出模态框 -->
          <div class="modal modal-blur fade" id="modal_user_logout" tabindex="-1" style="display: none;" aria-hidden="true">
            <div class="modal-dialog modal-sm modal-dialog-centered" role="document">
              <div class="modal-content">
                <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
                <div class="modal-status bg-danger"></div>
                <div class="modal-body text-center py-4">
                  <!-- Download SVG icon from http://tabler-icons.io/i/alert-triangle -->
                  <svg xmlns="http://www.w3.org/2000/svg" class="icon mb-2 text-danger icon-lg" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M12 9v2m0 4v.01"></path><path d="M5 19h14a2 2 0 0 0 1.84 -2.75l-7.1 -12.25a2 2 0 0 0 -3.5 0l-7.1 12.25a2 2 0 0 0 1.75 2.75"></path></svg>
                  <h3>确定要退出吗?</h3>
                  <div class="text-muted">点击确定您将退出当前登录.</div>
                </div>
                <div class="modal-footer">
                  <div class="w-100">
                    <div class="row">
                      <div class="col"><a href="javascript:void(0);" class="btn w-100" data-bs-dismiss="modal">
                          取消
                        </a></div>
                      <div class="col"><a href="javascript:void(0);" class="btn btn-danger w-100" data-bs-dismiss="modal">
                          确定
                        </a></div>
                    </div>
                  </div>
                </div>
              </div>
            </div>
          </div>
        
          <!-- 页脚 开始 -->
          <footer class="footer footer-transparent d-print-none align-self-center">
            <div class="container-xl">
              <div class="row text-center align-items-center">
                <div class="col-lg-auto ms-lg-auto">
                  <ul class="list-inline list-inline-dots mb-0">
                    <li class="list-inline-item">
                      Copyright &copy; 2024
                      <a href="javascript:void(0);" class="link-secondary">比特就业课</a>
                      版权所有
                    </li>
                    <li class="list-inline-item">
                      <a href="javascript:void(0);" class="link-secondary">
                        GITEE
                      </a>
                    </li>
                  </ul>
                </div>
              </div>
            </div>
            <!-- 页脚 结束 -->
          </footer>
        </div>

    <!-- page 页面结束 -->
    </div>
    
    <!-- 导入JS -->
     <script src="./dist/js/jquery-3.6.3.min.js"></script>
    <script src="./dist/js/tabler.min.js"></script>
    <script src="./dist/js/theme.min.js"></script>
    <script src="./dist/js/jquery.toast.js"></script>
    <script src="./dist/editor.md/editormd.min.js"></script>
    <script src="./dist/editor.md/lib/marked.min.js"></script>
    <script src="./dist/editor.md/lib/prettify.min.js"></script>
    <script src="./dist/js/jq-paginator.min.js"></script>
    <script src="./dist/libs/litepicker/dist/litepicker.js"></script>
    <script src="js/common.js"></script>
    <script>
      $(function(){
        // 获取用户信息
        $.ajax({
          type: 'get',
          url: 'user/details',
          contentType: 'application/x-www-form-urlencoded',
          success : function (respData) {
            // 失败
            if (respData.code != 0) {
              // 提示
              $.toast({
                heading: '提示',
                text: respData.message,
                icon: 'info'
              });
              return;
            }
            // 成功 设置全局用户
            currentUser = respData.data;
            // 姓名
            $('#index-nav-user-name').html(currentUser.name);
            // 头像
            let userAvatarUrl = avatarUrl;
            if (currentUser.avatarUrl) {
              userAvatarUrl = currentUser.avatarUrl;
            }
            $('#index-nav-user-avatar').css('background-image', 'url(' +  (userAvatarUrl) + ')');
          }
        });
      });

      // 退出登录
      $('#index-nav-logout').click(function() {
        // 删除TOKEN
        localStorage.removeItem(REQUEST_HEADER);
        // 跳转到登录页
        location.assign('sign-in.html');
      });

    </script>

    <script>
      // 页面操作的事件绑定
      $(function() {
        // 首页内容
        if (currentUserStatus == USER_CANDIDATE) {
          // 加载职位列表
          $('#bit-page-content').load('index_jobs.html');
        } else if (currentUserStatus == USER_PUBLISHER) {
          // 加载牛人列表
          $('#bit-page-content').load('index_users.html');
        }

        // 切换身份，默认求职者
        $('#find_positions').click(function () {
          // 加载职位列表
          $('#bit-page-content').load('index_jobs.html');
        });
        // 发布者
        $('#find_candidate').click(function () {
          // 加载牛人列表
          $('#bit-page-content').load('index_users.html');
        });

        // 加载投递记录页
        $('#index-nav-record-list').click(function(){
          $('#bit-page-content').load('record_list.html');
        });

        // 加载职位管理页
        $('#index-nav-job-list').click(function(){
          $('#bit-page-content').load('job_list.html');
        });

        // 加载职位发布页
        $('#index-nav-job-new').click(function(){
          $('#bit-page-content').load('job_new.html');
        });

        // 加载个人中心页
        $('#index-nav-settings').click(function(){
          $('#bit-page-content').load('settings.html');
        });

      });
    </script>

    
  </body>
</html>